import { request } from '@/utils/request'

/**
 * 获取热门品牌
 * @param { number } limit
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const findBrand = (limit = 6) => {
    return request('/home/brand','GET',{ limit })
}

/**
 * 获取广告图
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getBanner = () => {
    return request('/home/banner','GET')
}

/**
 * 获取新鲜好物列表
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getNew = () => {
    return request('home/new','GET')
}

/**
 * 获取人气推荐列表
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getHot = () => {
    return request('/home/hot','GET')
}

/**
 * 获取商品列表
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getGoods = () => {
    return request('/home/goods','GET')
}

/**
 * 获取最新专题
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getSpecial = () => {
    return request('/home/special','GET')
}